home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pdt_set2.zip / DEMO2.BAT < prev    next >
DOS Batch File  |  1992-03-11  |  3KB  |  100 lines

  1. @Echo off
  2. cls
  3. :
  4. : ---- See if required files are here.
  5. :
  6. If Not Exist  Fields.Exe goto FilesNotFound
  7. If Not Exist DBF-ASC.Exe goto FilesNotFound
  8. If Not Exist ASC-DBF.Exe goto FilesNotFound
  9. If Not Exist  Sample.DBF goto FilesNotFound
  10. Goto Start
  11. :
  12. :FilesNotFound
  13. :
  14. Echo I couldn't find one of the following files.  I'm ending . . .
  15. Echo   
  16. Echo   Fields.Exe,  DBF-ASC.Exe,  ASC-DBF.Exe,  Sample.DBF
  17. Echo 
  18. Goto End
  19. :
  20. :Start
  21. If Not Exist Sample.!!! Goto Run_Fields
  22. :
  23. Del Sample.!!!
  24. :
  25. : ---- Run FIELDS using Sample.DBF to quickly create Sample.!!!
  26. :
  27. :Run_Fields
  28. Fields Sample.DBF
  29. Echo   
  30. Echo   
  31. :
  32. :
  33. :
  34. Pause
  35. :
  36. : ---- Run DBF-ASC using Sample.DBF to quickly create Sample.ASC
  37. :
  38. cls
  39. Echo I'm about to run DBF-ASC.  As soon as it runs, press F2 and
  40. Echo answer the questions you'll see near the bottom of your screen.
  41. Echo   
  42. Echo BE SURE to answer [Y]es when asked if we should save a DEFINITION FILE.
  43. Echo We'll need that definition file in the next step.
  44. Echo   
  45. Echo   
  46. Pause
  47. If Not Exist Sample.ASC Goto Run_DBF-ASC
  48. :
  49. Del Sample.ASC
  50. :
  51. :Run_DBF-ASC
  52. :
  53. DBF-ASC   Sample.DBF     Sample.ASC
  54. cls
  55. :
  56. :
  57. : ---- Now run ASC-DBF.  Create a NEW .DBF file from Sample.ASC.
  58. :
  59. If Not Exist SAMPLE.ASC goto End
  60. If Not Exist SAMPLE.DEF goto End
  61. Echo I'm now about to run ASC-DBF.  As soon as it runs, press F2 and
  62. Echo answer the questions you'll see near the bottom of your screen.
  63. Echo   
  64. Echo This will create a brand new dBASE file SAMPLE2.DBF based on the
  65. Echo ASCII data you saved in the last step.
  66. Echo   
  67. pause
  68. :
  69. If Not Exist Sample2.DBF Goto Run_ASC-DBF
  70. :
  71. Del Sample2.DBF
  72. :
  73. :Run_ASC-DBF
  74. ASC-DBF   Sample.DEF   Sample.ASC   Sample2.DBF
  75. :
  76. :
  77. : ---- All done.
  78. :
  79. cls
  80. Echo You should find several new files here (if all went according to plan).
  81. Echo   
  82. Echo  1.  Sample.!!! (created by FIELDS) shows the field structure of Sample.DBF.
  83. Echo   
  84. Echo   
  85. Echo  2.  Sample.ASC and Sample.DEF (created by DBF-ASC) are, respectively:
  86. Echo   
  87. Echo      - A comma-delimited ASCII version of the dBase file Sample.DBF.
  88. Echo   
  89. Echo      - A "definition file" that we can use for 2 things:  It can be
  90. Echo        used by ASC-DBF to create a dBase file from Sample.Asc.  And it
  91. Echo        also serves as a record of which fields you saved to Sample.Asc.
  92. Echo   
  93. Echo   
  94. Echo  3.  Sample2.DBF (created by ASC-DBF).
  95. Echo   
  96. Echo  If all this was fast, that's the point.  The Tool Kit programs are
  97. Echo  small, easy-to-use, and very f-a-s-t!   Enjoy them.
  98. Echo   
  99. :End
  100.